//
//  MMConstants.h
//  MemeEditor
//
//  Created by Phan Quang Ha on 7/8/13.
//  Copyright (c) 2013 soyo. All rights reserved.
//

#ifndef MemeEditor_MMConstants_h
#define MemeEditor_MMConstants_h

#define APP_NAME @"iChế"
#define APP_LINK @"https://itunes.apple.com/us/app/iche/id688946836?ls=1&mt=8"

#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define IS_IPHONE_5 (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 568.0f)

#define DEFAULT_IMG_WIDTH 250.0f
#define DEFAULT_TXT_WIDTH 300.0f

#define DEFAULT_PEN_SIZE 10.0f
#define DEFAULT_PEN_OPACITY 1.0f
#define DEFAULT_PEN_RED 0.0f
#define DEFAULT_PEN_GREEN 0.0f
#define DEFAULT_PEN_BLUE 0.0f

#define DOCUMENT_FOLDER [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]

#define kMMAppDelegate          (MMAppDelegate*)[[UIApplication sharedApplication] delegate]

#define FOLDER_MEME @"MemeContainer"
#define FOLDER_MEME2 @"MemeContainer2"
#define FOLDER_VOICE_BOX @"VoiceBoxContainer"
#define FOLDER_WORKSPACE @"WorkspaceContainer"

#define idImagesCell @"kImageCellIdentifierString"

#define NOTIFY_UPDATE_PREVIEWING_PICTURE @"kNotificationUpdatePreviewingImage"
#define NOTIFY_GET_IMAGE_FROM_CAMERA @"kNotificationGetImageFromCamera"
//#define NOTIFY_GET_PICTURE_EDIT @"kNotificationGetImageEdit"

#define ALERT_TAG_CONFIRM_CANCEL 001
#define ALERT_TAG_CONFIRM_SAVE 002
#define ALERT_TAG_CONFIRM_SHARE 003

#define TOOLBAR_TINT_COLOR [UIColor colorWithRed:31.0f/255.0f green:54.0f/255.0f blue:210.0f/255.0f alpha:0.9]
#define TOOLBAR_TINT_COLOR2 [UIColor colorWithRed:31.0f/255.0f green:88.0f/255.0f blue:189.0f/255.0f alpha:0.3]
//#define TOOLBAR_TINT_COLOR [UIColor colorWithRed:60/255.0f green:86/255.0f blue:225/255.0f alpha:0.9]

#define kMMManagerData [MMManagerData instance]
#define ADMOB_PUBLISHER_ID @"a15219ada4e8967"

#define BUNDLE_VERSION_EQUAL_TO(v)                  ([[[NSBundle mainBundle]     objectForInfoDictionaryKey:(NSString*) kCFBundleVersionKey] compare:v  options:NSNumericSearch] == NSOrderedSame)
#define BUNDLE_VERSION_GREATER_THAN(v)              ([[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*) kCFBundleVersionKey] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define BUNDLE_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*) kCFBundleVersionKey] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define BUNDLE_VERSION_LESS_THAN(v)                 ([[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*) kCFBundleVersionKey]  compare:v options:NSNumericSearch] == NSOrderedAscending)
#define BUNDLE_VERSION_LESS_THAN_OR_EQUAL_TO(v)     ([[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*) kCFBundleVersionKey] compare:v options:NSNumericSearch] != NSOrderedDescending)

#define SYSTEM_VERSION [[UIDevice currentDevice] systemVersion]
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)

#define STATUS_BAR_HEIGHT 20

typedef enum
{
    kTOP_LEFT,
    kTOP_RIGHT,
    kBOT_LEFT,
    kBOT_RIGHT
}MY_POSITION;

typedef enum {
    sDrawing,
    sAddingImage,
    sAddingText
}DRAWING_STATE;

#endif
